package testJdk.base.juc_test.test_lock.producer_and_consumer;


/**
 * @ClassName : design_pattern.producer_and_consumer.TestProducerConsumer
 * @Description : 类描述
 * Created by cyd on 2021-10-14 10:52:11
 */
public class TestProducerConsumer {

    public static void main(String[] args) {
        MyBlockingQueue<String> blockingQueue = new MyBlockingQueue<>(100);
        new Thread(new Producer(blockingQueue)).start();
        new Thread(new Consumer(blockingQueue)).start();
        new Thread(new Producer(blockingQueue)).start();
        new Thread(new Consumer(blockingQueue)).start();
    }
}
